package com.qfedu.zf.life.service.impl;

import com.qfedu.zf.common.param.CheckinDTO;
import com.qfedu.zf.common.vo.R;
import com.qfedu.zf.life.entity.CheckinRecord;
import com.qfedu.zf.life.mapper.CheckinRecordMapper;
import com.qfedu.zf.life.service.CheckinRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wjw
 * @since 2024-06-21
 */
@Service
public class CheckinRecordServiceImpl extends ServiceImpl<CheckinRecordMapper, CheckinRecord> implements CheckinRecordService {

    @Autowired
    private CheckinRecordMapper checkinRecordMapper;
    @Override
    public void checkin(CheckinDTO checkinDTO) {
        CheckinRecord record = new CheckinRecord();

        record.setUserId(checkinDTO.getUserId());
        record.setCheckinDate(new Date());
        checkinRecordMapper.insert(record);
    }
}
